<%--
  Created by IntelliJ IDEA.
  User: Liu
  Date: 2023/8/24
  Time: 16:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <base href="${ctx}/">
    <title>登录界面</title>
    <script src="assets/lib/jQuery/jquery-3.7.0.min.js"></script>
    <script src="assets/lib/layer/layer.js"></script>
    <link rel="stylesheet" href="assets/CSS/login/login.css">
    <script>
        //判断窗口是否为顶层窗口
        if (window !== top){
            top.location.reload();
        }
        const ctx = "${ctx}/";
        const error = "${error}";
        const user = "${User}";
        console.log(user)
    </script>
    <script src="assets/JS/login/login.js"></script>
</head>

<body>
<form action="user/login" method="post">
    <div id="login">
        <p>欢迎使用京喜电商商品信息管理系统</p>
        <div id="input1">用户名:<input type="text" name="username" value="${User.username}"><br></div>
        <div id="input2"> 密　码:<input type="password" name="password"></div>
        <div> 验证码:<input type="text" name="captcha" id="captcha">
        </div>
        <div id="captchaDiv">
            <img src="user/captcha" class="captcha" alt="captcha">
        </div>
        <div id="button">
            <button class="button" type="submit" name="sub">登录</button>
            <button class="button" type="reset" name="reset">重置</button>
        </div>
    </div>
</form>
</body>
</html>
